package com.codehub;

import com.codehub.service.SysSettingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("initRun")
public class InitRun implements ApplicationRunner {
    @Resource
    private SysSettingService sysSettingService;

    private static final Logger logger = LoggerFactory.getLogger(InitRun.class);

    @Override
    public void run(ApplicationArguments args) {
        sysSettingService.refresCache();
        logger.info("访客端后台服务器启动成功");
    }
}
